using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class DENTALLABMap : EntityTypeConfiguration<DENTALLAB>
    {
        public DENTALLABMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.PATIENT)
                .HasMaxLength(6);

            this.Property(t => t.GENDER)
                .HasMaxLength(10);

            this.Property(t => t.SHAPE)
                .HasMaxLength(35);

            this.Property(t => t.METAL)
                .HasMaxLength(35);

            this.Property(t => t.INSTRUCTION)
                .HasMaxLength(200);

            this.Property(t => t.PHYSICIAN)
                .HasMaxLength(6);

            this.Property(t => t.RESULT)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("DENTALLAB");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.PATIENT).HasColumnName("PATIENT");
            this.Property(t => t.AGE).HasColumnName("AGE");
            this.Property(t => t.GENDER).HasColumnName("GENDER");
            this.Property(t => t.SHAPE).HasColumnName("SHAPE");
            this.Property(t => t.METAL).HasColumnName("METAL");
            this.Property(t => t.DATE).HasColumnName("DATE");
            this.Property(t => t.FIRSTTRIALDATE).HasColumnName("FIRSTTRIALDATE");
            this.Property(t => t.SECONDTRIALDATE).HasColumnName("SECONDTRIALDATE");
            this.Property(t => t.FINALTRIALDATE).HasColumnName("FINALTRIALDATE");
            this.Property(t => t.INSTRUCTION).HasColumnName("INSTRUCTION");
            this.Property(t => t.PHYSICIAN).HasColumnName("PHYSICIAN");
            this.Property(t => t.RESULT).HasColumnName("RESULT");
        }
    }
}
